<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>操作日志</title>
    <link rel="stylesheet" href="__LAY__/css/layui.css" media="all">
    <link rel="stylesheet" href="__CSS__/main.css" media="all">
    <link rel="stylesheet" href="__FONT__/css/font-awesome.min.css" media="all" />
</head>
<body>
<div class="right_body">
    <div class="right_content_top">
        <blockquote class="layui-elem-quote">
            <button class="layui-btn layui-btn-radius layui-btn-normal">搜索</button>
        </blockquote>
    </div>
    <div style="text-align: center;">
        <div class="layui-inline">
            <table id="demo" lay-filter="test"></table>
        </div>
    </div>

</div>
</body>
<script type="text/javascript" src="__JS__/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="__LAY__/layui.js"></script>
<script type="text/javascript" src="__JS__/index.js"></script>
<script src="https://cdn.bootcss.com/limonte-sweetalert2/7.21.1/sweetalert2.all.js"></script>
<script>
    function initTable()
    {
        layui.use('table', function(){
            var table = layui.table;
            //第一个实例
            table.render({
                elem: '#demo'
                ,height: 500
                ,url: "{:url('index/operation')}" //数据接口
                ,page: true //开启分页
                ,cols: [[ //表头
                    {field: 'username', title: '用户名',unresize:true,align:'center'}
                    ,{field: 'url', title: '操作路径',unresize:true,align:'center'}
                    ,{field: 'create_time', title: '操作时间',unresize:true,align:'center'}
                ]]
            });
        });
    }
    $(document).ready(function () {
        //调用函数，初始化表格
        initTable();
    });
</script>
</html>